package spring.ai_chat.Web.pojo;

import lombok.Data;

import java.util.Map;


@Data
public class Response {
    Boolean success;
    String message = "";
    Map<String, String> data;

    public static Response success(Map<String, String> data) {

        Response re = new Response();
        re.success = true;
        re.message = "success";
        re.data = data;
        return re;
    }

    public static Response fail(String message) {
        Response re = new Response();
        re.success = false;
        re.message = message;
        return re;
    }
}
